From dee5c91428ba89e31d2c1e619c8166527970297f Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Fri, 21 Sep 2007 12:49:31 -0600 Subject: [PATCH] [IA64] vmx_vcpu_tak: Fix bugs Signed-off-by: Tristan Gingold --- xen/arch/ia64/vmx/vmmu.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/xen/arch/ia64/vmx/vmmu.c b/xen/arch/ia64/vmx/vmmu.c index 9505a2daac..899774b687 100644 --- a/xen/arch/ia64/vmx/vmmu.c +++ b/xen/arch/ia64/vmx/vmmu.c @@ -671,18 +671,19 @@ IA64FAULT vmx_vcpu_tpa(VCPU *vcpu, u64 vadr, u64 *padr) u64 vmx_vcpu_tak(VCPU *vcpu, u64 vadr) { thash_data_t *data; - PTA vpta; u64 key; - vpta.val = vmx_vcpu_get_pta(vcpu); - if(vpta.vf==0 || unimplemented_gva(vcpu, vadr)){ - key=1; + + if (unimplemented_gva(vcpu, vadr)) { + key = 1; return key; } + + /* FIXME: if psr.dt is set, look in the guest VHPT. */ data = vtlb_lookup(vcpu, vadr, DSIDE_TLB); - if(!data||!data->p){ + if (!data || !data->p) key = 1; - }else{ - key = data->key; - } + else + key = data->key << 8; + return key; } -- 2.30.2